import request from '@/api/request/index'
import type { DatePageCaiGouDanBianGengXiaoXiobject, MessageQueryDto } from './_interfaces.ts'

/** 是否有新消息 */
export function messageHasPoChangeMessage(): Promise<boolean> {
  return request.get('/api/message/hasPoChangeMessage')
}

/** 标记已读 */
export function messageLogRead(): Promise<boolean> {
  return request.post('/api/message/logRead')
}

/** 当前供应商消息数 */
export function messageMessageCount(): Promise<number> {
  return request.get('/api/message/messageCount')
}

/** 查询采购单变更消息 */
export function messageQueryPoChangeMessage(data: MessageQueryDto): Promise<DatePageCaiGouDanBianGengXiaoXiobject> {
  return request.post('/api/message/queryPoChangeMessage', data)
}
